<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false"
    CodeFile="AssetMaintainLog.aspx.vb" Inherits="WebForm_Mail_AssetMaintainLog" %>


<%@ Register Src="Component/AssetLogDetail.ascx" TagName="AssetDetail" TagPrefix="uc7" %>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
        <asp:ObjectDataSource ID="dbAssetDef" runat="server" SelectMethod="GetAssetType"
                TypeName="AssetManage.BBL.AssetBBL">
                <SelectParameters>
                    <asp:Parameter DefaultValue="1" Name="kind" Type="String" />
                    <asp:ControlParameter ControlID="hiDBName" DefaultValue="" Name="dbName" PropertyName="Value"
                        Type="String" />
                </SelectParameters>
            </asp:ObjectDataSource>
        <asp:ObjectDataSource ID="dbASSETLog" runat="server" SelectMethod="GetAssetLogData" TypeName="AssetManage.BBL.AssetLogBBL">
                <SelectParameters>
                    <asp:ControlParameter ControlID="ddlAssetDef" Name="assetdef_id" PropertyName="SelectedValue"
                        Type="String" DefaultValue="0" />
                    <asp:ControlParameter ControlID="txtowner" Name="asset_owner" PropertyName="Text"
                        Type="String" ConvertEmptyStringToNull="False" DefaultValue="" />
                    <asp:ControlParameter ControlID="txtAsset_SerialNo" Name="asset_SerialNo" PropertyName="Text"
                        Type="String" ConvertEmptyStringToNull="False" DefaultValue="" />
                    <asp:ControlParameter ControlID="txtDept" Name="Dept" PropertyName="Text" Type="String"
                        ConvertEmptyStringToNull="False" DefaultValue="" />
                    <asp:ControlParameter ControlID="ddlHouseID" Name="HouseID" PropertyName="SelectedValue"
                        Type="String" ConvertEmptyStringToNull="False" DefaultValue="" />
                    <asp:ControlParameter ControlID="txtMAC" Name="MAC" PropertyName="Text" Type="String"
                        ConvertEmptyStringToNull="False" />
                    <asp:ControlParameter ControlID="txtComputerName" Name="ComputerName" PropertyName="Text"
                        Type="String" ConvertEmptyStringToNull="False" />
                    <asp:ControlParameter ControlID="txtIP" Name="IP" PropertyName="Text" Type="String"
                        ConvertEmptyStringToNull="False" DefaultValue ="" />
                    <asp:ControlParameter ControlID="hiDBName" Name="dbName" PropertyName="Value" Type="String"
                        ConvertEmptyStringToNull="False" />
                </SelectParameters>
            </asp:ObjectDataSource>
            <asp:HiddenField ID="hiUID" runat="server" />
            <asp:HiddenField ID="hiDBName" runat="server" />
          
            <table>
                <tr>
                    <td style="text-align: center">
                        <asp:Label ID="lblTitle" runat="server" Font-Bold="True" Font-Size="24px" meta:resourcekey="lblTitle"></asp:Label>
                    </td>
                </tr>
                <tr style="vertical-align: text-top">
                    <td>
                        <table border="1" width="900px">
                            <tr>
                                <td align="right" style="width: 111px">
                                    <asp:Label ID="lblAssetDef" runat="server" meta:resourcekey="lblAssetDef"></asp:Label>
                                </td>
                                <td style="width: 182px">
                                    <asp:DropDownList ID="ddlAssetDef" runat="server" Width="120px" DataSourceID="dbAssetDef"
                                        DataTextField="name" DataValueField="id">
                                    </asp:DropDownList>
                                </td>
                                <td align="right" style="width: 144px">
                                    <asp:Label ID="lblAssetowner" runat="server" meta:resourcekey="lblAssetowner"></asp:Label>
                                </td>
                                <td style="width: 204px">
                                    <asp:TextBox ID="txtowner" runat="server" Width="80px"></asp:TextBox>
                                </td>
                                <td align="right" style="width: 111px">
                                    <asp:Label ID="lblAsset_SerialNo" runat="server" meta:resourcekey="lblAsset_SerialNo"></asp:Label>
                                </td>
                                <td style="width: 182px">
                                    <asp:TextBox ID="txtAsset_SerialNo" runat="server" Width="80px"></asp:TextBox>
                                </td>
                                <td align="right" style="width: 144px">
                                    <asp:Label ID="lblDept" runat="server" meta:resourcekey="lblDept"></asp:Label>
                                </td>
                                <td style="width: 204px">
                                    <asp:TextBox ID="txtDept" runat="server" Width="80px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td align="right" style="width: 111px">
                                    <asp:Label ID="lblHouseID" runat="server" meta:resourcekey="lblHouseID"></asp:Label>
                                </td>
                                <td style="width: 182px">
                                    <asp:DropDownList ID="ddlHouseID" runat="server" Width="120px">
                                        <asp:ListItem meta:resourcekey="HouseID1"></asp:ListItem>
                                        <asp:ListItem meta:resourcekey="HouseID2"></asp:ListItem>
                                        <asp:ListItem meta:resourcekey="HouseID3"></asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                                <td align="right" style="width: 144px">
                                    <asp:Label ID="lblMAC" runat="server" meta:resourcekey="lblMAC"></asp:Label>
                                </td>
                                <td style="width: 204px">
                                    <asp:TextBox ID="txtMAC" runat="server" Width="80px"></asp:TextBox>
                                </td>
                                <td align="right" style="width: 111px">
                                    <asp:Label ID="lblComputerName" runat="server" meta:resourcekey="lblComputerName"></asp:Label>
                                </td>
                                <td style="width: 182px">
                                    <asp:TextBox ID="txtComputerName" runat="server" Width="80px"></asp:TextBox>
                                </td>
                                <td align="right" style="width: 144px">
                                    <asp:Label ID="lblIP" runat="server" meta:resourcekey="lblIP" Visible="False"></asp:Label>
                                </td>
                                <td style="width: 204px">
                                    <asp:TextBox ID="txtIP" runat="server" Style="margin-bottom: 0px" Width="80px" 
                                        Visible="False"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td align="center" colspan="8">
                                    <asp:LinkButton ID="btnQuery" runat="server" meta:resourcekey="btnQuery"></asp:LinkButton>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="8">
                                    
                                            <TServerControl:TGridView ID="gvMain" runat="server" AllowHoverEffect="False" AllowHoverSelect="False"
                                        AllowPaging="True" AutoGenerateColumns="False" DataSourceID="dbASSETLog" ShowFooterWhenEmpty="False"
                                        ShowHeaderWhenEmpty="True" SkinID="pager" TotalRowCount="0" Width="900px" 
                                                Visible="False" DataKeyNames="asset_serialNo,SeqNo">
                                        <Columns>
                                            <asp:TemplateField meta:resourcekey="colMaintain" ItemStyle-Wrap="False">
                                                <ItemTemplate>
                                                    <asp:LinkButton ID="btnDetil" runat="server" meta:resourcekey="btnDetil" 
                                                        CommandName="Select"></asp:LinkButton>
                                                </ItemTemplate>
                                                <ItemStyle Wrap="False" />
                                            </asp:TemplateField>
                                            <asp:TemplateField meta:resourcekey="colModiType" ItemStyle-Wrap="False">
                                                <ItemTemplate>
                                                    <asp:DropDownList ID="ddlModiType" runat="server" Enabled ="False" 
                                                        SelectedValue='<%# Bind("ModiType") %>' >
                                                      
                                                        <asp:ListItem meta:resourcekey="ModiType0"></asp:ListItem>
                                                        <asp:ListItem meta:resourcekey="ModiType1"></asp:ListItem>
                                                        <asp:ListItem meta:resourcekey="ModiType2"></asp:ListItem>
                                                        <asp:ListItem meta:resourcekey="ModiType3"></asp:ListItem>
                                                        <asp:ListItem meta:resourcekey="ModiType4"></asp:ListItem>
                                                        <asp:ListItem meta:resourcekey="ModiType5"></asp:ListItem>
                                                        <asp:ListItem meta:resourcekey="ModiType6"></asp:ListItem>
                                                      <asp:ListItem meta:resourcekey="ModiType7"></asp:ListItem>
                                                    </asp:DropDownList>
                                                </ItemTemplate>
                                                <ItemStyle Wrap="False" />
                                            </asp:TemplateField>
                                            <asp:BoundField meta:resourcekey="colassetdef_id" DataField="DefName" />
                                            <asp:BoundField meta:resourcekey="colasset_serialNo" DataField="asset_serialNo" />
                                            <asp:BoundField meta:resourcekey="colSeqNo" DataField="SeqNo" />
                                            <asp:BoundField meta:resourcekey="colasset_owner" DataField="ownerName" />
                                            <asp:BoundField meta:resourcekey="colUser2" DataField="UseName" />
                                            <asp:BoundField meta:resourcekey="colasset_status" DataField="asset_status" />
                                            <asp:BoundField meta:resourcekey="colComputerName" DataField="ComputerName" />
                                            <asp:BoundField HeaderText="Class" DataField="Class" />
                                            <asp:BoundField meta:resourcekey="colLocation" DataField="Location"  />
                                        </Columns>
                                        <EmptyDataTemplate>
                                            <asp:Label ID="lblEmpty" runat="server" ForeColor="Red" meta:resourcekey="lblEmpty"></asp:Label>
                                        </EmptyDataTemplate>
                                    </TServerControl:TGridView>
                                     
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
            
                <uc7:AssetDetail ID="AssetDetail1" runat="server" Visible="True" />
           
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
